<!DOCTYPE html>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>会员详细</title>
<jsp:include page="/common/commonCss.jsp" />
<jsp:include page="/common/commonJs.jsp" />
<script src="${basePath }commonJs/tags/My97DatePicker/WdatePicker.js"></script>
<script src="${basePath }resources/membership/finger.js"></script>
<script src="${basePath }resources/file/vip.js"></script>
<script  type="text/javascript" src="${basePath }commonJs/ajaxfileupload.js"></script>

<style>
#btnPrevTop,#btnNextTop,#listBoxTop {
	float: left;
}

#btnPrevTop,#btnNextTop {
	width: 30px;
	height: 18px;
	line-height: 18px;
	padding: 41px 0;
	text-align: center;
}

#listBoxTop {
	width: 496px;
	height: 276px;
	overflow: hidden;
}

#containerTop {
	float: left;
	width: 556px;
	height: 276px;
}

#btnPrev,#btnNext,#listBox {
	float: left;
}

#btnPrev,#btnNext {
	width: 30px;
	height: 18px;
	line-height: 18px;
	padding: 41px 0;
	text-align: center;
}

#listBox {
	width: 420px;
	height: 276px;
	overflow: hidden;
}

#container {
	width: 500px;
	height: 276px;
}
#listTop > li{ width:492px;}
</style>
<script src="${basePath}commonJs/jquery.imageScroller.js"></script>
<script type="text/javascript">

	$(function () {
		 $("#listBoxTop").imageScroller({
	         next: "btnNextTop",
	         prev: "btnPrevTop",
	         frame: "listTop",
	         child: "li",
	         auto: false
	     });
	    $("#listBox").imageScroller({
	        next: "btnNext",
	        prev: "btnPrev",
	        frame: "list",
	        child: "li",
	        auto: false
	    });
	});
	// 选中的会员
	var selMemberId = "";
	// 选中的会员
	var familyId = "${memberInfo.familyId}";
	var selIsBlack = "";
	var selStatus = "";
	var selInTime = "";
	var selOutTime = "";
	var base = "${basePath}";
	
	function setMemberCss(obj,status,inTime,outTime,isBlack,isStopCard,isUniq) {
		//初始化判断是否能续会
		var isBuyMem=false;
		if(status!="1"){
			isBuyMem=true;
		}
		<%--
		<c:forEach items="${memList }" var="member" varStatus="status">
			var memType="${member.memType}";
			var status="${member.status}";
			if(memType == 1 && (status == 3 || status == 5 || status == '' || status == null)){
				isBuyMem=true;
			}
		</c:forEach>
		--%>
		
		if (obj == null) return;
		if (selMemberId == obj.id) {
			selMemberId = "";
			selIsBlack = "";
			selStatus = "";
			selInTime = "";
			selOutTime = "";
			//obj.style.backgroundColor = '';
			//判断小朋友头像背景色
			var bgColor="";
			if(isBlack==1 || status==3 || status==4 || status==null || status==''){//红色-问题（过期/黑名单/停卡）
				if((inTime!=null && inTime!="") && (outTime==null || outTime=="")){//绿色-场内
					bgColor="coll_img colle_img_lv";
				}else{//灰色-场外
					bgColor="coll_img colle_img_red";
				}
			}else{
				if((inTime!=null && inTime!="") && (outTime==null || outTime=="")){//绿色-场内
					bgColor="coll_img colle_img_lv";
				}else{//灰色-场外
					bgColor="coll_img colle_img_ccc";
				}
			}
			$("#"+obj.id).attr("class",bgColor);
			
			//无人选中时，禁用所有按钮
			isEnableBtn(false,isBuyMem,status,isBlack,isStopCard,isUniq,inTime,outTime);
		} else {
			//如果id全局值为空，则调用启用按钮
			//if(selMemberId == ""){
				isEnableBtn(true,isBuyMem,status,isBlack,isStopCard,isUniq,inTime,outTime);//启用所有按钮
			//}
			
			//清除旧的
			var bgColor="";
			if(selIsBlack==1 || selStatus==3 || selStatus==4 || selStatus==null || selStatus==''){//红色-问题（过期/黑名单/停卡）
				if((inTime!=null && inTime!="") && (outTime==null || outTime=="")){//绿色-场内
					bgColor="coll_img colle_img_lv";
				}else{//灰色-场外
					bgColor="coll_img colle_img_red";
				}
			}else{
				if((selInTime!=null && selInTime!="") && (selOutTime==null || selOutTime=="")){//绿色-场内
					bgColor="coll_img colle_img_lv";
				}else{//灰色-场外
					bgColor="coll_img colle_img_ccc";
				}
			}
			$("#"+selMemberId).attr("class",bgColor);
			
			//加入新的
			//obj.style.backgroundColor = '#6eafdd';
			$("#"+obj.id).attr("class","coll_img colle_img_blue");
			selMemberId = obj.id;
			selIsBlack = isBlack;
			selStatus = status;
			selInTime = inTime;
			selOutTime = outTime;

			// 验证指定会员是否还有未使用的单次票
			$.ajax({
				cache : false,
				type : "get",
				dataType : "json",
				url : base + "membership/single/checkEnableSingleByMemberId.shtml?memberId=" + selMemberId,
				error : function(XMLHttpRequest) {
					ajaxError(XMLHttpRequest);
				},
				success : function(data) {
					if (data == "1") {
						// 不可用
						$('#goupiao').attr('disabled',"true");
						$('#goupiao').removeClass().addClass("btn_no");
					} else{
						// 可用
						$('#goupiao').removeAttr('disabled');
						$('#goupiao').removeClass().addClass("btn");
					}
				}
			});
			
			$("#returnGoodMemId").val(selMemberId);//赋值给退票接收会员Id
			$("#buyCourseMemberId").val(selMemberId);//赋值给购买课程会员Id
			$("#memberId").val(selMemberId);//赋值给购买课程会员Id
		}
	}
	
	function isEnableBtn(flag,isBuyMem,status,isBlack,isStopCard,isUniq,inTime,outTime){
		var type="${type }";
		if(flag==true){
			if(type=="1"){
				//$("#fanhui").removeAttr("disabled").removeClass().addClass("btn");
				if(status!="5" && status!="3"){
					if(isBuyMem==true){
						$("#xuhui").show();
						if(isBlack==1 || status=="4"){
							$("#xuhui").attr("disabled","disabled").removeClass().addClass("btn_no");
						}else{
							$("#xuhui").removeAttr("title").removeAttr("disabled").removeClass().addClass("btn");
						}
						$("#goumaihuiji2").hide();
					}else{
						$("#xuhui").show();
						$("#xuhui").attr("title","会员续会，必须已激活!").attr("disabled","disabled").removeClass().addClass("btn_no");
						$("#goumaihuiji2").hide();
					}
				}else{
					//新建的直接购买
					$("#xuhui").hide();
					if(isBlack==1 || status=="4"){
						$("#goumaihuiji2").attr("disabled","disabled").removeClass().addClass("btn_no");
					}else{
						$("#goumaihuiji2").removeAttr("title").removeAttr("disabled").removeClass().addClass("btn");
					}
					$("#goumaihuiji2").show();
				}
				//$("#xuhui").removeAttr("disabled").removeClass().addClass("btn");
				if(status=="3" || isBlack==1 || status=="4"){
					//失效时屏蔽按钮
					$("#chongzhi").attr("disabled","disabled").removeClass().addClass("btn_no");
					$("#goumaikecheng").attr("disabled","disabled").removeClass().addClass("btn_no");
					$("#shangchuanhetong").attr("disabled","disabled").removeClass().addClass("btn_no");
					$("#scdwmzsm").attr("disabled","disabled").removeClass().addClass("btn_no");
					//$("#tingka").attr("disabled","disabled").removeClass().addClass("btn_no");
					//$("#qxtingka").hide();
					if(isUniq==2){
						$("#tingka").hide();
						$("#qxtingka").show();
						$("#qxtingka").removeAttr("disabled").removeClass().addClass("btn");
					}else{
						$("#qxtingka").hide();
						$("#tingka").show();
						$("#tingka").attr("disabled","disabled").removeClass().addClass("btn_no"); 
					}
					
					$("#dayinhetong").attr("disabled","disabled").removeClass().addClass("btn_no");
					$("#sheweiheimingdan").attr("disabled","disabled").removeClass().addClass("btn_no");
				}else{
					$("#chongzhi").removeAttr("disabled").removeClass().addClass("btn");
					$("#goumaikecheng").removeAttr("disabled").removeClass().addClass("btn");
					$("#shangchuanhetong").removeAttr("disabled").removeClass().addClass("btn");
					$("#scdwmzsm").removeAttr("disabled").removeClass().addClass("btn");
					
					//停卡时
					//alert(status+"|"+isStopCard+"|"+isUniq);
					if(status!=2 || isStopCard==0 || isUniq==1){
						if(status!=2){
							$("#qxtingka").hide();
							$("#tingka").show();
							$("#tingka").attr("disabled","disabled").removeClass().addClass("btn_no"); 
						}else{
							if(isStopCard==0){
								$("#qxtingka").hide();
								$("#tingka").show();
								$("#tingka").attr("disabled","disabled").removeClass().addClass("btn_no"); 
							}else{
								if((inTime!=null && inTime!="") && (outTime==null || outTime=="") && isUniq==2){//绿色-场内
									//可取消停卡
									$("#tingka").hide();
									$("#qxtingka").show();
									$("#qxtingka").removeAttr("disabled").removeClass().addClass("btn");
								}else{
									//不可停卡
									if(isUniq==0){
										$("#qxtingka").hide();
										$("#tingka").show();
										$("#tingka").removeAttr("disabled").removeClass().addClass("btn");
									}else if(isUniq==2){
										$("#tingka").hide();
										$("#qxtingka").show();
										$("#qxtingka").removeAttr("disabled").removeClass().addClass("btn");
									}else{
										$("#qxtingka").hide();
										$("#tingka").show();
										$("#tingka").attr("disabled","disabled").removeClass().addClass("btn_no"); 
									}
								}
							}
						}
					}else{
						if(isUniq==0){
							$("#qxtingka").hide();
							$("#tingka").show();
							$("#tingka").removeAttr("disabled").removeClass().addClass("btn");
						}else{
							$("#tingka").hide();
							$("#qxtingka").show();
							$("#qxtingka").removeAttr("disabled").removeClass().addClass("btn");
						}
					}
					
					$("#dayinhetong").removeAttr("disabled").removeClass().addClass("btn");
					$("#sheweiheimingdan").removeAttr("disabled").removeClass().addClass("btn");
				}
				if(status=="3"){
					//失效时屏蔽按钮
					$("#th").attr("disabled","disabled").removeClass().addClass("btn_no");
					$("#tuikuan").attr("disabled","disabled").removeClass().addClass("btn_no");
				}else{
					if(status=="5"){
						//新建时不能退会
						$("#th").attr("disabled","disabled").removeClass().addClass("btn_no");
					}else{
						$("#th").removeAttr("disabled").removeClass().addClass("btn");
					}
					$("#tuikuan").removeAttr("disabled").removeClass().addClass("btn");
				}
			}else if(type=="2"){
				//$("#fanhui2").removeAttr("disabled").removeClass().addClass("btn");
				if(isBlack==1){
					$("#goupiao").attr("disabled","disabled").removeClass().addClass("btn_no");
					$("#tuipiao").attr("disabled","disabled").removeClass().addClass("btn_no");
					$("#goumaihuiji").attr("disabled","disabled").removeClass().addClass("btn_no");
					$("#chongzhi2").attr("disabled","disabled").removeClass().addClass("btn_no");
					$("#tuikuan2").removeAttr("disabled").removeClass().addClass("btn");
					$("#shangchuanghetong2").attr("disabled","disabled").removeClass().addClass("btn_no");
					$("#scdwmzsm2").attr("disabled","disabled").removeClass().addClass("btn_no");
					$("#sheweiheimingdan2").attr("disabled","disabled").removeClass().addClass("btn_no");
				}else{
					$("#goupiao").removeAttr("disabled").removeClass().addClass("btn");
					$("#tuipiao").removeAttr("disabled").removeClass().addClass("btn");
					$("#goumaihuiji").removeAttr("disabled").removeClass().addClass("btn");
					$("#chongzhi2").removeAttr("disabled").removeClass().addClass("btn");
					$("#tuikuan2").removeAttr("disabled").removeClass().addClass("btn");
					$("#shangchuanghetong2").removeAttr("disabled").removeClass().addClass("btn");
					$("#scdwmzsm2").removeAttr("disabled").removeClass().addClass("btn");
					$("#sheweiheimingdan2").removeAttr("disabled").removeClass().addClass("btn");
				}
			}else{
				//$("#fanhui3").removeAttr("disabled").removeClass().addClass("btn");
				if(isBlack==1){
					$("#goupiao2").attr("disabled","disabled").removeClass().addClass("btn_no");
					$("#goumaihuiji2").attr("disabled","disabled").removeClass().addClass("btn_no");
					$("#sheweiheimingdan3").attr("disabled","disabled").removeClass().addClass("btn_no");
				}else{
					$("#goupiao2").removeAttr("disabled").removeClass().addClass("btn");
					$("#goumaihuiji2").removeAttr("disabled").removeClass().addClass("btn");
					$("#sheweiheimingdan3").removeAttr("disabled").removeClass().addClass("btn");
				}
			}
		}else{
			if(type=="1"){
				//$("#fanhui").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#xuhui").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#goumaihuiji2").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#th").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#chongzhi").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#tuikuan").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#goumaikecheng").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#dayinhetong").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#shangchuanhetong").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#scdwmzsm").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#tingka").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#qxtingka").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#sheweiheimingdan").attr("disabled","disabled").removeClass().addClass("btn_no");
			}else if(type=="2"){
				//$("#fanhui2").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#goupiao").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#tuipiao").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#goumaihuiji").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#chongzhi2").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#tuikuan2").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#shangchuanghetong2").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#scdwmzsm2").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#sheweiheimingdan2").attr("disabled","disabled").removeClass().addClass("btn_no");
			}else{
				//$("#fanhui3").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#goupiao2").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#goumaihuiji2").attr("disabled","disabled").removeClass().addClass("btn_no");
				$("#sheweiheimingdan3").attr("disabled","disabled").removeClass().addClass("btn_no");
			}
		}
	}
	
	//判断是否已退款或退会
	function getBackOrder(){
		var count=0;
		$.ajax({
			cache : false,
			async: false,
			type : "get",
			dataType : "json",
			url : base + "filemanagement/getBackOrder.shtml",
			data : "memberId=" + selMemberId,
			success : function(backOrderCount) {
				if(backOrderCount!=null && parseInt(backOrderCount)>0){
					alertWarning("订单已存在，请等候处理！");
					count++;
				}else{
					count--;
				}
			},
			error : function(XMLHttpRequest) {
				ajaxError(XMLHttpRequest);
			}
		});
		if(count>0){
			return "false";
		}else{
			return "true";
		}
	}
	
	$(document).ready(function() {
		// 初始化当前会员为选中状态
		setMemberCss(document.getElementById("${memberId}"),"${memberInfo.status}","${memberInfo.inTime}","${memberInfo.outTime}","${memberInfo.isBlack}","${memberInfo.isStopCard}","${memberInfo.isUniq}");
		
		var $numInfo=document.getElementById('num_info');
		var $num=document.getElementById('telNum');
		$num.onkeyup = function() {
			var _val = "";
			var val = this.value = $num.value.replace(/[^\d]/g, '');
			len = val.length;
			if (val != '') {
				$numInfo.style.display = 'block';
			}
			if (len <= 3) {
				_val = val;
			} else if (len > 3 && len <= 7) {
				_val = val.substr(0, 3) + "-" + val.substr(3, len);
			} else if (len > 7) {
				_val = val.substr(0, 3) + "-" + val.substr(3, 4)+ "-" + val.substr(7, len);
			}
			$numInfo.innerHTML = _val;
		};
		$num.onblur=function(){
			$numInfo.style.display='none';		
		};

		// 退会
		$("#th").click(function() {
			var flag = getBackOrder();
			if(flag=="false"){
				return;
			}
			$.ajax({
				cache : false,
				type : "get",
				url : "getRetreatMember.shtml?memberId="+selMemberId,
				success : function(data) {//data为返回的数据，在这里做数据绑定
					if (data == null || data.length == 0) {
						alertInfo("没有匹配的记录!");
						return;
					}
					trimJson(data);
					if (data.status == "3" || data.status == "5") {
						alertError("新建或过期的会员不能操作！");
						return;
					}
					var remainAmount;
					$("#memberId_th").val(selMemberId);
					$("#memberCardId_th").val(data.memberCardId);
					$("#fkOrderId_th").val(data.fkOrderId);
					if (data.validDate == "") {
						// 会员有效期
						$("#validDate").html("未激活");
						// 剩余天数
						$("#remainDay").html("--");
						remainAmount = data.cardPrice;
						// 剩余会籍费用
						$("#remainAmount").html(data.cardPrice);
						$("#cardPrice_th").val(data.cardPrice);
					} else {
						// 会员有效期
						$("#validDate").html(data.validDate);
						// 剩余天数
						var remainDay=data.remainDay;
						var remainAmount=0;
						if(remainDay==0 || remainDay=='' || remainDay==null){
							$("#remainDay").html("0");
							remainAmount = 0;
							$("#remainAmount").html("0");
							//禁用按钮
							$('#placeOrder').attr("disabled","disabled").removeClass().addClass("btn_no");
						}else{
							$("#remainDay").html(remainDay);
							remainAmount = data.cardPrice / data.totalDay * data.remainDay;
							$("#remainAmount").html(data.cardPrice + "/" + data.totalDay + "*" + data.remainDay + "=" + remainAmount.toFixed(2));
							//启用按钮
							$('#placeOrder').removeAttr("disabled").removeClass().addClass("btn");
						}
						// 剩余会籍费用
						$("#cardPrice_th").val(remainAmount.toFixed(2));
					}
					// 帐户余额
					$("#balance_span").html(data.balance);
					$("#balance_th").val(data.balance);
					// 退款
					$("#amount_th").val((remainAmount + data.balance).toFixed(2));
					$('#tuihui').window('open');
				},
				error : function(XMLHttpRequest) {
					ajaxError(XMLHttpRequest);
				}
			});
		});
		
		// 下单结算
		$("#placeOrder").click(function() {
			if ($.trim($("#amount_th").val()) == "") {
				alertError("请输入退款金额！");
				return false;
			}
			if (isNaN($("#amount_th").val())) {
				alertError("退款金额必须是数字！");
				return false;
			}
			if ($("#managePassword").val() == "") {
				alertError("请输入经理密码！");
				$("#fkDisusrId_th").val("");
				return false;
			}
			// 经理密码验证
			$.ajax({
				cache : false,
				async: false,
				type : "get",
				url : "${basePath}membership/single/validationManagerPassword.shtml",
				data : "password=" + $("#managePassword").val(),
				success : function(data) {
					if (data == "0") {
						alertError("密码错误！");
						$("#fkDisusrId_th").val("");
						return false;
					} else {
						$("#fkDisusrId_th").val(data);
					}
				},
				error : function(XMLHttpRequest) {
					ajaxError(XMLHttpRequest);
				}
			});
			if ($("#fkDisusrId_th").val() == "") {
				return;
			}
			$.messager.confirm('提示', '确认要退会吗?', function(r) {
				if (r) {
					$.ajax({
						cache : false,
						type : "post",
						url : "${basePath}filemanagement/retreatMember.shtml",
						data : $("#retreatForm").serialize(),
						success : function(data) {
							if (data != null) {
								$("#orderId_th").val(data);
								$('#placeOrder').attr('disabled',"true");
								$('#placeOrder').removeClass().addClass("btn_no");
								alertInfo("订单保存成功");
							}
						},
						error : function() {
							alertError("订单保存失败!");
						}
					});
				}
			});
		});

		// 刷新付款结果
		$("#refreshPayResult").click(function() {
			$.ajax({
				cache : false,
				type : "post",
				url : "${basePath}membership/member/refreshPayResult.shtml",
				data : "orderId=" + $("#orderId_th").val(),
				success : function(data) {
					if (data == 1) {
						$("#payId_th").val("已退款");
					} else {
						$("#payId_th").val("未退款");
					}
				},
				error : function() {
					alertError("查询失败!");
				}
			});
		});
		
	});
	
	//购买课程操作后，异步刷新历史记录
	function getAjaxcourseHis() {
	var memberIds="${memberIds}";
	$.ajax({
		cache : false,
		type : "get",
		url : "getAjaxcourseHis.shtml?memberId="+memberIds,
		complete : function() {
		},
		success : function(data) {//data为返回的数据，在这里做数据绑定
			$("#buyCourseHisTable li").remove();
			if (data == null || data.length == 0) {
				//alertInfo("没有匹配的记录!");
			} else {
				trimJsonArray(data);
				$("#buyCourseHisTable tr").remove();
				for (var i = 0; i < data.length; i++) {
					var hisOrder = data[i];
					var html= "<tr>";
					html+="<td rowspan='2'>"+hisOrder.fkPrdId+"</td>"+
						 	 "<td rowspan='2'>"+hisOrder.prdName+"</td>"+
						 	 "<td rowspan='2'>"+hisOrder.cnt+"</td>"+
						 	 "<td>"+hisOrder.startDatePage+"</td>"+
							 "<td rowspan='2'>"+hisOrder.pkMemClassId+"</td>"+
						 	 "</tr>"+
						 	 "<tr>"+
						 	 "<td>"+hisOrder.endDatePage+"</td>"+
						 	 "</tr>";
					$("#buyCourseHisTable").append(html);
				}
			}
		},
		error : function(XMLHttpRequest) {
			ajaxError(XMLHttpRequest);
		}
	});
}
	
function toExtendMem(type){
	window.location.href="queryMemberDetail.shtml?memberId="+selMemberId+"&type="+type;
}

function toBuyTickets(cpnId,cpnAmount,type){
	window.location.href="${basePath}membership/single/queryMemberDetail.shtml?cpnId="+cpnId+"&cpnAmount="+cpnAmount+"&memberId="+selMemberId+"&type="+type;
}

function toBuyMember(type){
	window.location.href="${basePath}membership/member/queryMemberDetail.shtml?memberId="+selMemberId+"&type="+type;
}


//上传
function uploadSignFile(id,i) {
	if ($("#"+id).val() == '') {
		alertError("请在上传前先选择文件");
		return false;
	}
	$.ajaxFileUpload({
		url : '${basePath}filemanagement/uploadFete.shtml',
		secureuri : false, //是否启用安全提交,默认为false 
		fileElementId : id, //文件选择框的id属性
		dataType : 'text', //服务器返回的格式,可以是json或xml等
		success : function(data) { //服务器响应成功时的处理函数‘
			data = decodeURI(data);
			if (data != "") {
				alertInfo("上传成功");
				if(i=="1"){
					$("#contractName").html(data);
					$("#fkContract").val(data);
					var memberId=$("#memberId").val();
					updateHisMember(memberId,'1');
				}else if(i=="2"){
					$("#disclaName").html(data);
					$("#fkPlayDiscla").val(data);
					var memberId=$("#memberId").val();
					updateHisMember(memberId,'2');
				}else{
					$("#mngFile").val("");//清空路径
					$("#stopcardName").html(data);
					$("#mngFile").val(data);
				}
			} else {
				alertError("上传失败，请重试！");
			}
		},
		error : function(XMLHttpRequest) {
			 ajaxError(XMLHttpRequest);
			}
	});
}

function setvalue(id,id2) {
	var fileName = $("#"+id).val();
	if(fileName.lastIndexOf("\\") != -1){
		fileName = fileName.substring(fileName.lastIndexOf("\\")+1);
	}
	$("#"+id2).val(fileName);
}

function downloadFilFun1() {
	$("#accountForm")[0].submit();
}

function downloadFilFun2() {
	$("#disclaForm")[0].submit();
}

function downloadFilFun3() {
	$("#stopcardForm")[0].submit();
}
</script>
</head>
<body class="bg">
	<div class="content m_auto">
		<div class="content_l mt10">
			<ul>
				<shiro:hasPermission name="filemanagement/listVip.shtml?type=1">
					<li <c:if test="${type=='1'}">class="content_hover"</c:if>><a href="${basePath }filemanagement/listVip.shtml?type=1"><i class="nav_icon_b"></i><br>会员管理</a></li>
				</shiro:hasPermission>
				<shiro:hasPermission name="filemanagement/viewVistors.shtml?type=3">
            		<li <c:if test="${type=='3'}">class="content_hover"</c:if>><a href="${basePath }filemanagement/viewVistors.shtml?type=3"><i class="nav_icon_d"></i><br>访客管理</a></li>
            	</shiro:hasPermission>
            	<shiro:hasPermission name="filemanagement/listViewSingelTicket.shtml?type=2">
           			<li <c:if test="${type=='2'}">class="content_hover"</c:if>><a href="${basePath }filemanagement/listViewSingelTicket.shtml?type=2"><i class="nav_icon_a"></i><br>非会员管理</a></li>
           		</shiro:hasPermission>
           		<shiro:hasPermission name="parreserve/parReserveManages.shtml?indexflag=">
					<li><a href="${basePath }parreserve/parReserveManages.shtml?indexflag="><i class="nav_icon_g"></i><br>预约管理</a></li>
				</shiro:hasPermission>
           		<shiro:hasPermission name="filemanagement/customer/serviceList.shtml">
            		<li><a href="${basePath}filemanagement/customer/serviceList.shtml"><i class="nav_icon_h"></i><br>客户服务</a></li>
            	</shiro:hasPermission>
           		<shiro:hasPermission name="crm/jumpCrm.shtml">
					<li><a href="${basePath }crm/jumpCrm.shtml"><i class="nav_icon_n"></i><br>客户关系管理</a></li>
				</shiro:hasPermission>
			</ul>
		</div>
		<div class="content_r mt10">
			<div class="collection_l fixed">
				<div class="collection_t ml10 fixed">
					<div id="containerTop">
						<div id="btnNextTop">
							<a class="collection_t_l" href="javascript:void(0);"></a>
						</div>
						<div id="listBoxTop">
							<ul id="listTop">
								<!-- 会员信息 start -->
								<c:forEach items="${memList }" var="member" varStatus="status">
									<c:if test="${member.memType == type}">
									<li id="li_member_${member.pkMemId}">
										<div class="collection_contet mt20">
											<div class="collection_img fl" >
												<span class="collection_span">
													<span class="ing_hover">
														<i>${member.imageTimePage}</i>
														<img  onclick="setMemberCss(this,'${member.status}','${member.inTime}','${member.outTime}','${member.isBlack}','${member.isStopCard}','${member.isUniq}')" id="${member.pkMemId}" class="
														<c:if test="${member.isBlack == 1 || member.status == 3 || member.status == 4 || member.status == null || member.status == ''}">
															<c:if test="${(member.inTime != null && member.inTime != '') && (member.outTime == null || member.outTime == '')}">
																coll_img colle_img_lv
															</c:if>
															<c:if test="${(member.inTime == null || member.inTime == '') || (member.outTime != null && member.outTime != '')}">
																coll_img colle_img_red
															</c:if>
														</c:if>
														<c:if test="${member.isBlack != 1 && member.status != 3 && member.status != 4 && member.status != null && member.status != ''}">
															<c:if test="${(member.inTime != null && member.inTime != '') && (member.outTime == null || member.outTime == '')}">
																coll_img colle_img_lv
															</c:if>
															<c:if test="${(member.inTime == null || member.inTime == '') || (member.outTime != null && member.outTime != '')}">
																coll_img colle_img_ccc
															</c:if>
														</c:if>
														" style="width:145px;height:190px;" src="${basePath}common/showImage.shtml?imagePath=${member.imagePath}">
													</span>
												</span>
												<a href="#" onClick="
													<c:if test="${type == 1}">openMember('${member.pkMemId}');</c:if>
													<c:if test="${type != 1}">openNotMember('${member.pkMemId}');</c:if>
													" class="collection_img_l" title="编辑">
													<i class="editor_icon"></i>
												</a>
												<a href="#" onclick="deleteMember('${member.pkMemId}','${member.status}');" class="collection_img_r" title="删除"><i class="delete_icon"></i></a>
											</div>
											<div class="collection_text w160 fl">
												<div class="fl">
													<h2>
														<i class="f18" title="${member.memName}">
														<c:choose> 
															<c:when test="${fn:length(member.memName) > 5}">${fn:substring(member.memName, 0, 5)}...</c:when> 
															<c:otherwise>${member.memName}</c:otherwise>
														</c:choose>
														</i>
														<em class="ml10">${member.sex}</em>
														<br>
															<c:if test="${member.isVip == 1}">
																<i class="vip_icon mt5"></i>
															</c:if>
															<c:if test="${member.isBlack == 1}">
																<img src="${basePath}commonCss/images/hmd.png" class="ml10 mt5">
															</c:if>
													</h2>
													<dl class="f14 mt20">
														<dd>生日：${member.birthdayPage}</dd>
														<dd>国籍：${member.countryDesc}</dd>
														<dd>
															<c:if test="${member.memType == 1}">会员</c:if>
															<c:if test="${member.memType == 2}">非会员</c:if>
															<c:if test="${member.memType == 3}">访客</c:if>
															：<span class="f11">${member.pkMemId}</span>
														</dd>
														<c:if test="${type!=3 }">
															<dd>余额：￥<span id="memBalance"><fmt:formatNumber pattern="#,###,###,###">${member.balance}</fmt:formatNumber></span></dd>
														</c:if>
														<!-- <dd>推荐会员：刘宇1</dd>-->
														<!--<i class="heto_icon"></i>-->
														<dd>${member.memberCardName}</dd>
														<dd>
															<c:if test="${member.status == 2}">
																<i class="youx_icon mr10"></i>
															</c:if>
															<c:if test="${member.signDisclaimer == 1}">
																<i class="duwa_icon ml10"></i>
															</c:if>
														</dd>
													</dl>
												</div>

											</div>
											<c:if test="${type == 1}">
											<div class="zhuyi">
												<h1>注意事项</h1>
												<p title="${member.note}">
													<c:choose> 
														<c:when test="${fn:length(member.note) == 0}">无</c:when> 
														<c:when test="${fn:length(member.note) > 38}">${fn:substring(member.note, 0, 38)}...</c:when> 
														<c:otherwise>${member.note}</c:otherwise>
													</c:choose>
												</p>
												<h1 class="zhuyi_bo">员工备注</h1>
												<p title="${member.memo}">
													<c:choose> 
														<c:when test="${fn:length(member.memo) == 0}">无</c:when> 
														<c:when test="${fn:length(member.memo) > 38}">${fn:substring(member.memo, 0, 38)}...</c:when> 
														<c:otherwise>${member.memo}</c:otherwise>
													</c:choose>
												</p>
											</div>
											</c:if>
										</div>
									</li>
									</c:if>
								</c:forEach>
								<!-- 会员信息 end -->
							</ul>
						</div>
						<div id="btnPrevTop">
							<a href="javascript:void(0);" class="collection_t_r"></a>
						</div>
					</div>
					<a href="#" class="collection_add fr" onclick="<c:if test='${type == 1}'>openMember('');</c:if><c:if test='${type != 1}'>openNotMember('');</c:if>">
						<img src="${basePath }commonCss/images/index_02.gif">
					</a>
				</div>
				<div class=" border_top">
					<div id="container" class="collection_b ml10 fixed fl">
						<div id="btnNext">
							<a class="collection_t_l" href="javascript:void(0);"></a>
						</div>
						<div id="listBox">
							<ul id="list">
								<c:forEach items="${guaList }" var="gua">
									<%-- <li id="li_gua_${gua.pkGuaId}">
										<h1>${gua.relDesc }</h1>
										<p class="coll_img" id="${gua.pkGuaId }">
											<i>${gua.imageTimePage }</i> 
											<img src="${basePath}common/showImage.shtml?imagePath=${gua.imagePath}" width="102" height="136">
										</p>
										<dl class="collection_t_l_dl">
											<dd>${gua.name }<a href="#" onClick="deleteGua('${gua.pkGuaId }');" class="delete_icon fr ml10" title="删除"></a>
												<a href="#"  onClick="openGua('${gua.pkGuaId }');" class="editor_icon fr" title="编辑"></a>
											</dd>
											<dd>${gua.telNum }</dd>
											<dd>
												<c:if test="${gua.canReceive == 1 }">
													<i class="jiel_icon"></i>
												</c:if>
												<c:if test="${gua.canConsume == 1 }">
													<i class="qians_icon ml10" title="可消费余额"></i>
												</c:if>
											</dd>
										</dl>
									</li> --%>
									<li id="li_gua_${gua.pkGuaId}">
										<h1>${gua.relDesc }</h1>
										<p class="
										<c:if test="${(gua.inTime != null && gua.inTime != '') && (gua.outTime == null || gua.outTime == '')}">
											coll_img colle_img_lv
										</c:if>
										<c:if test="${(gua.inTime == null || gua.inTime == '') || (gua.outTime != null && gua.outTime != '')}">
											coll_img colle_img_ccc
										</c:if>
										" id="${gua.pkGuaId }">
											<i>${gua.imageTimePage }</i> 
											<img src="${basePath}common/showImage.shtml?imagePath=${gua.imagePath}" width="102" height="136">
										</p>
										<dl class="collection_t_l_dl">
											<dd title="${gua.name }">
														<c:choose> 
															<c:when test="${fn:length(gua.name) > 5}">${fn:substring(gua.name, 0, 5)}...</c:when> 
															<c:otherwise>${gua.name}</c:otherwise>
														</c:choose>
											<a href="#" onClick="deleteGua('${gua.pkGuaId }');" class="delete_icon fr ml10" title="删除"></a>
												<a href="#"  onClick="openGua('${gua.pkGuaId }');" class="editor_icon fr" title="编辑"></a>
											</dd>
											<dd>${gua.telNum }</dd>
											<dd>
												<c:if test="${gua.canReceive == 1 }">
													<i class="jiel_icon"></i>
												</c:if>
												<c:if test="${gua.canConsume == 1 }">
													<i class="qians_icon ml10" title="可消费余额"></i>
												</c:if>
											</dd>
										</dl>
									</li>
								</c:forEach>
							</ul>
						</div>
						<div id="btnPrev">
							<a class="collection_t_r" href="javascript:void(0);"></a>
						</div>
					</div>
					<div class="fr m20">
						<a href="#" onClick="openGua('');"><img
							class="collection_jia" src="${basePath }commonCss/images/index_02.gif"
							width="120" height="154"></a>
					</div>
				</div>
			</div>
			
			<div class="collection_r">
        	<div class="tab_normal">
                <ul id="tab_a" class=" fixed">
           			<c:if test="${type=='1'}">
               			<li>进出场历史</li>
                    	<li>购票历史</li>
                    	<li>消费历史</li>   
                    	<li>客服历史</li>
                    	<li>购课历史</li>
            		</c:if>
            		<c:if test="${type=='2'}">    
          				<li>购票历史</li>
                    	<li>消费历史</li>   
                    	<li>客服历史</li>
             		</c:if>  
             		<c:if test="${type=='3'}">     
                    	<li>进出场历史</li>
                    	<li>客服历史</li>
             		</c:if>
                </ul>
                <ul id="tab_conbox_a" class="fixed" style="height: 570px; overflow-y: auto;">
                <c:if test="${type=='1' || type=='3'}">
                    <li>
                    	<table class="table">
                        	<tr>                                                   
                            	<th width="40">序号</th>
                                <th>儿童名称</th>
                                <th>入场时间</th>
                                <th>出场时间</th>
                                <th>入场人数</th>
                            </tr>
                            
                            <c:if test="${inOutHisList!=null && inOutHisList[0]!=null}">
                            <c:forEach items="${inOutHisList}" var="obj" varStatus="i">
                            	<tr>
	                             	<td>${i.count}</td>
	                                <td title="${obj.memName}">
	                                	<c:choose> 
											<c:when test="${fn:length(obj.memName) > 5}">${fn:substring(obj.memName, 0, 5)}...</c:when> 
											<c:otherwise>${obj.memName}</c:otherwise>
										</c:choose>
	                                </td>
	                                <td>${obj.inTimePage}</td>
	                                <td>${obj.outTimePage}</td>
	                                <td>${obj.perCount}</td>
	                            </tr>
                            </c:forEach>
                            </c:if>
                        </table>
                        <div class="page fr m10"></div>
                    </li>
                </c:if>
                <c:if test="${type=='1' || type=='2'}">
                    <li>
                    	<table class="table"><tr>                                                   
                            	<th width="40">序号</th>
                                <th>儿童名称</th>
                                <th>票类</th>
                                <th>购票时间</th>
                                <th>状态</th>
                            </tr>
                            <c:if test="${hisTicketList!=null && hisTicketList[0]!=null}">
                            <c:forEach items="${hisTicketList}" var="obj" varStatus="i">
                            	<tr>
	                             	<td>${i.count}</td>
	                                <td title="${obj.memName}">
	                                	<c:choose> 
											<c:when test="${fn:length(obj.memName) > 5}">${fn:substring(obj.memName, 0, 5)}...</c:when> 
											<c:otherwise>${obj.memName}</c:otherwise>
										</c:choose>
	                                </td>
	                                <%-- <td>${obj.hisType==1?"购票":"购买会籍"}</td> --%>
	                                <td>${obj.prdName}</td>
	                                <td>${obj.modifyTimePage}</td>
	                                <td>${obj.usedStatus==0?"已使用":"未使用"}</td>
	                            </tr>
                            </c:forEach>
                            </c:if>
                        </table>
                        <div class="page fr m10"></div>
                    </li>
                </c:if>
                <c:if test="${type=='1' || type=='2'}">
                    <li>
                    	<table class="table">
                        	<tr>                                                   
                            	<th width="40">序号</th>
                                <th>儿童名称</th>
                                <th>消费时间</th>
                                <th>消费金额</th>
                                <th>消费内容</th>
                            </tr>
                            	<c:if test="${orderPayHisList!=null && orderPayHisList[0]!=null}">
                            	<c:forEach items="${orderPayHisList}" var="obj" varStatus="i">
                            	<tr>
	                             	<td>${i.count}</td>
	                                <td title="${obj.memName}">
	                                	<c:choose> 
											<c:when test="${fn:length(obj.memName) > 5}">${fn:substring(obj.memName, 0, 5)}...</c:when> 
											<c:otherwise>${obj.memName}</c:otherwise>
										</c:choose>
	                                </td>
	                                <td>${obj.payTimePage}</td>
	                                <td>
	                                	<c:if test="${obj.amount!=null && obj.amount>0}">
	                                		￥${obj.amount}
	                                	</c:if>
	                                </td>
	                                <td>${obj.prdName}</td><!-- &nbsp;${obj.prdCount} -->
	                            </tr>
                            	</c:forEach>
                            	</c:if>
                        </table>
                        <div class="page fr m10"></div>
                    </li>
                </c:if>
                    <li>
                    	<table class="table">
                        	<tr>                                                   
                            	<th width="40">序号</th>
                                <th>儿童名称</th>
                                <th>服务时间</th>
                                <th>服务内容</th>
                                <th>处理人</th>
                            </tr>
                            	<c:if test="${carCareFormHisList!=null && carCareFormHisList[0]!=null}">
                            	<c:forEach items="${carCareFormHisList}" var="obj" varStatus="i">
                            	<tr>
	                             	<td>${i.count}</td>
	                                <td title="${obj.memName}">
	                                	<c:choose> 
											<c:when test="${fn:length(obj.memName) > 5}">${fn:substring(obj.memName, 0, 5)}...</c:when> 
											<c:otherwise>${obj.memName}</c:otherwise>
										</c:choose>
	                                </td>
	                                <td>${obj.modiTimePage}</td>
	                                <td title="${obj.comments}">
	                                					<c:choose> 
															<c:when test="${fn:length(obj.comments) > 15}">${fn:substring(obj.comments, 0, 15)}...</c:when> 
															<c:otherwise>${obj.comments}</c:otherwise>
														</c:choose>
	                                </td>
	                                <td>${obj.userName}</td>
	                            </tr>
                            	</c:forEach>
                            	</c:if>
                        </table>
                        <div class="page fr m10"></div>
                    </li>
                <c:if test="${type=='1'}">
                    <li class="p1">
                    	<table class="table">
                        	<tr>
                                <th>课程编号</th>
                                <th>课程名称</th>
                                <th>次数</th>
                                <th>有效期</th>
                                <th>学员编号</th>
                            </tr>
                            <tbody id="buyCourseHisTable">
                            	<c:if test="${buyCourseHisList!=null && buyCourseHisList[0]!=null}">
                            	<c:forEach items="${buyCourseHisList}" var="obj" varStatus="i">
                            	<tr>
	                             	<td rowspan="2">${obj.fkPrdId}</td>
	                                <td rowspan="2" title="${obj.prdName}">
	                                	<c:choose> 
											<c:when test="${fn:length(obj.prdName) > 8}">${fn:substring(obj.prdName, 0, 8)}...</c:when> 
											<c:otherwise>${obj.prdName}</c:otherwise>
										</c:choose>
	                                </td>
	                                <td rowspan="2">${obj.cnt}</td>
	                                <td>
	                                	${obj.startDatePage}
	                                </td>
	                                <td rowspan="2">${obj.pkMemClassId}</td>
	                            </tr>
	                            <tr>
	                            	<td>
	                                	${obj.endDatePage}
	                                </td>
	                            </tr>
                            	</c:forEach>
                            </c:if>
                            </tbody>
                        </table>
                        <div class="page fr m10"></div>
                    </li>
               </c:if>
                </ul>
            </div>
        </div>
			<div class="clear"></div>
			<div class="btm_btn mt20">
        	<dl>
        	<c:if test="${type=='1'}">
				<dd><input id="fanhui" type="button" value="返 回" class="btn" style="width: 90px;" onclick="location.href='listVip.shtml';"></dd>
                <dd>
                	<shiro:hasPermission name="memberManager:extendMem">
                		<input id="xuhui" type="button" class="btn" value="续 会" style="width: 90px;" onClick="toExtendMem('${type}');">
                	</shiro:hasPermission>
                	<shiro:hasPermission name="memberManager:buyMem">
                		<input id="goumaihuiji2" style="display: none;" type="button" class="btn" value="购买会籍" onClick="toBuyMember('${type}')">
                	</shiro:hasPermission>
                </dd>
                <shiro:hasPermission name="memberManager:exsitMem">
                	<dd><input id="th" type="button" class="btn" value="退会" style="width: 90px;" ></dd>
                </shiro:hasPermission>
                <shiro:hasPermission name="memberManager:rechargeMem">
                	<dd><input id="chongzhi" type="button" class="btn" value="充 值" style="width: 90px;" onClick="clearup('cz');getMemerInfo('1');"></dd>
                </shiro:hasPermission>
                <shiro:hasPermission name="memberManager:refundMem">
                	<dd><input id="tuikuan" type="button" class="btn" value="退 款" style="width: 90px;" onClick="clearup('tk2');getMemerInfo('2');"></dd>
                </shiro:hasPermission>
                <shiro:hasPermission name="memberManager:buycourseMem">
                	<dd><input id="goumaikecheng" type="button" class="btn" value="购买课程" style="width: 90px;" onClick="getAllLessons();"></dd>
                </shiro:hasPermission>
                <shiro:hasPermission name="memberManager:printAccountMem">
                	<dd><input id="dayinhetong" type="button" class="btn" value="打印合同" style="width: 90px;"></dd>
                </shiro:hasPermission>
                <shiro:hasPermission name="memberManager:uploadAccountMem">
                 	<dd><input id="shangchuanhetong" type="button" class="btn" value="合同附件" style="width: 90px;" onClick="getFilePath('1');"></dd>
                 </shiro:hasPermission>
                 
                 <%-- 
                <c:if test="${hisType!=null && hisType!=''}">
                <dd><input id="shangchuanhetong" type="button" class="btn" value="合同附件" onClick="clearup('ht');$('#t').window('open')"></dd>
                </c:if>
                <c:if test="${hisType==null || hisType==''}">
                <dd><input type="button" class="btn_no" value="合同附件" onClick="clearup('ht');$('#t').window('open')" disabled="disabled"></dd>
                </c:if>
                 --%>
                 <shiro:hasPermission name="memberManager:uploadDisclaimerMem">
                <dd><input id="scdwmzsm" type="button" class="btn" value="独玩免责声明" style="width: 90px;" onClick="getFilePath('2');"></dd>
                </shiro:hasPermission>
            	<dd>
            		<shiro:hasPermission name="memberManager:stopCardMem">
            			<input id="tingka" type="button" class="btn" value="停 卡" style="width: 90px;" onclick="getFilePath('3');">
            		</shiro:hasPermission>
            		<shiro:hasPermission name="memberManager:cancelStopCardMem">
                		<input id="qxtingka" type="button" class="btn" value="取消停卡" style="width: 90px;" onclick="cancelStopCard('2');">
                	</shiro:hasPermission>
            	</dd>
            <%-- <c:if test="${memberInfo.status!=4}">
            	<dd id="tingkadd">
            	<c:if test="${memberInfo.status!=2 || isStopCard==0 || isUniq==0}">
                	<input title="<c:if test='${memberInfo.status!=2  }'>有效的会员才可以停卡</c:if><c:if test='${isStopCard==0 }'>此会员卡类型不是12个月的</c:if><c:if test='${isStopCard!=0 && isUniq==0 }'>此会员卡已停卡一次</c:if>" type="button" class="btn_no" value="停 卡" style="width: 90px;" onclick="clearup('tk');$('#j').window('open')" disabled="disabled">
                </c:if>
                <c:if test="${memberInfo.status==2 && isStopCard!=0 && isUniq!=0}">
                	<input id="tingka" type="button" class="btn" value="停 卡" style="width: 90px;" onclick="getFilePath('3');">
                </c:if>
                	
                </dd>
            </c:if>
            <c:if test="${memberInfo.status==4}">
            	<dd id="qxtingkadd" style="display: none;"><input id="qxtingka" type="button" class="btn" value="取消停卡" style="width: 90px;" onclick="cancelStopCard('2');"></dd>
            </c:if> --%>
            	<shiro:hasPermission name="memberManager:blackMem">
                	<dd><input id="sheweiheimingdan" type="button" class="btn" value="设为黑名单" style="width: 90px;" onClick="clearup('hmd');$('#f').window('open')"></dd>
                </shiro:hasPermission>
            </c:if>
            <c:if test="${type=='2'}">
                <dd><input id="fanhui2" type="button" class="btn" value="返 回" onclick="location.href='listViewSingelTicket.shtml';"></dd>
                <shiro:hasPermission name="singleTicketManager:buyTicket">
                	<dd><input id="goupiao" type="button" class="btn" value="购 票" onClick="toBuyTickets('${cpnId}','${cpnAmount}','${type}')"></dd>
                </shiro:hasPermission>
                <shiro:hasPermission name="singleTicketManager:">
                	<dd style="display: none;"><input id="tuipiao" type="button" class="btn" value="退 票" onClick="clearup('tp');getSingleTicket();"></dd>
                </shiro:hasPermission>
                <shiro:hasPermission name="singleTicketManager:buyMem">
                	<dd><input id="goumaihuiji" type="button" class="btn" value="购买会籍" onClick="toBuyMember('${type}')"></dd>
                </shiro:hasPermission>
                <shiro:hasPermission name="singleTicketManager:rechargeMem">
                	<dd><input id="chongzhi2" type="button" class="btn" value="充值" onClick="clearup('cz');getMemerInfo('1');"></dd>
                </shiro:hasPermission>
                <shiro:hasPermission name="singleTicketManager:refundMem">
                	<dd><input id="tuikuan2" type="button" class="btn" value="退 款" onClick="clearup('tk2');getMemerInfo('2');"></dd>
                </shiro:hasPermission>
                <shiro:hasPermission name="singleTicketManager:uploadAccountMem">
                 	<dd><input id="shangchuanghetong2" type="button" class="btn" value="合同附件" onClick="getFilePath('1');"></dd>
                 </shiro:hasPermission>
                <%-- 
                <c:if test="${hisType!=null && hisType!=''}">
                <dd><input id="shangchuanghetong2" type="button" class="btn" value="合同附件" onClick="clearup('ht');$('#t').window('open')"></dd>
                </c:if>
                <c:if test="${hisType==null || hisType==''}">
                <dd><input type="button" class="btn_no" value="合同附件" onClick="clearup('ht');$('#t').window('open')" disabled="disabled"></dd>
                </c:if>
                 --%>
                <shiro:hasPermission name="singleTicketManager:uploadDisclaimerMem">
                	<dd><input id="scdwmzsm2" type="button" class="btn w150" value="独玩免责声明" onClick="getFilePath('2');"></dd>
                </shiro:hasPermission>
                <shiro:hasPermission name="singleTicketManager:blackMem">
                	<dd><input id="sheweiheimingdan2" type="button" class="btn" value="设为黑名单" onClick="clearup('hmd');$('#f').window('open')"></dd>
                </shiro:hasPermission>
             </c:if>  
             <c:if test="${type=='3'}">
                <dd><input id="fanhui3" type="button" class="btn" value="返 回" onclick="location.href='viewVistors.shtml';"></dd>
                <shiro:hasPermission name="visitorManager:buyTicket">
                	<dd><input id="goupiao2" type="button" class="btn" value="购 票" onClick="toBuyTickets('${cpnId}','${cpnAmount}','${type}')"></dd>
                </shiro:hasPermission>
                <shiro:hasPermission name="visitorManager:buyMem">
                	<dd><input id="goumaihuiji2" type="button" class="btn" value="购买会籍" onClick="toBuyMember('${type}')"></dd>
                </shiro:hasPermission>
                <shiro:hasPermission name="visitorManager:blackMem">
                	<dd><input id="sheweiheimingdan3" type="button" class="btn" value="设为黑名单" onClick="clearup('hmd');$('#f').window('open')"></dd>
                </shiro:hasPermission>
             </c:if>   
            </dl>
        </div>
		</div>
	</div>

<!---弹出层--->
<div id="tuihui" class="easyui-window" title="退会" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:450px; height:340px; position:relative;">
	<form id="retreatForm">
		<input type="hidden" id="orderId_th">
		<input type="hidden" id="memberId_th" name="memberId">
		<input type="hidden" id="memberCardId_th" name="pkPrdId">
		<input type="hidden" id="fkOrderId_th" name="fkOrderId">
		<input type="hidden" id="cardPrice_th" name="cardPrice">
		<input type="hidden" id="balance_th" name="balance">
		<input type="hidden" id="fkDisusrId_th" name="fkDisusrId">
		<dl class="tuihui">
			<dd><label>会员有效期：</label><span id="validDate"></span></dd>
			<dd><label>剩余天数：</label><span id="remainDay"></span></dd>
			<dd><label>剩余会籍费用：</label><span id="remainAmount"></span></dd>
			<dd><label>帐户余额：</label><span id="balance_span"></span></dd>
			<dd><label>退款：</label><input type="text" class="iput_t w100" id="amount_th" name="amount"><span class="color_red ml5">*</span></dd>
			<dd><label>经理密码：</label><input type="password" class="iput_t w100" id="managePassword"><span class="color_red ml5 vt">*</span></dd>
			<dd>
				<input type="button" class="btn" value="退款结算" id="placeOrder">
				<input type="button" class="btn ml10" value="刷新退款结果" id="refreshPayResult">
				<input type="text" class="iput_t w100  ml10" id="payId_th">
			</dd>
		</dl>
	</form>
    <div class="btm_btn btm_bg">
    	<dl>
    		<dd><input type="button" class="btn" onClick="$('#tuihui').window('close');" value="完成"></dd>
			<dd><input type="button" class="btn" onclick="$('#tuihui').window('close');" value="关闭"></dd>
        </dl>
    </div>
</div>
<!---弹出层--->

<!---弹出层--->
<div id="ee" class="easyui-window" title="退票" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:600px; height:380px; position:relative;">
<form id="returnGoodForm">
	<div class="file_single_tan">
    	<ul class="mt50">
    		<ul id="listSingleTicket">
            </ul>
            <li><label>退款：</label><input type="hidden" id="moneyTicketBak"><input type="text" class="iput_t" id="moneyTicket" onkeyup="rechargeOrReback('3',this);"></li>
            <li><label>订单总额：</label>￥<span id="amountTicket">0</span></li>
            <li class="tc">
            	<input type="button" class="btn_no" value="退票结算" id="toReTicket" disabled="disabled" onclick="refundGoods();">
            	<input type="button" class="btn w100" value="刷新付款结果" onclick="refreshPayResult('4');"><input id="payId4" type="text" class="iput_t w100 ml10">
            </li>
        </ul>
    </div>
    <input type="hidden" name="amountTicketInput" id="amountTicketInput" value="0" />
    <input type="hidden" name="liCount" id="liCount" value="0" />
    <input type="hidden" name="returnGoodMemId" id="returnGoodMemId" />
    <input type="hidden" name="fkOriorderId" id="fkOriorderId" />
</form>

    <div class="btm_btn btm_bg">
    	<dl>
        	<dd><input type="button" class="btn" onClick="$('#ee').window('close')" value="关闭"></dd>
        </dl>
    </div>
</div>
<!---弹出层--->

<!---弹出层--->
<div id="ex" class="easyui-window" title="购买课程" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:880px; height:550px; position:relative;">
	<div class="m10">
	
<form id="buyCourseForm">    
    <div id="scrollTable" style="width:856px !important">
            <table class="table">
            	<col width="50px"></col>
                <col width="120px"></col>
                <col width="160px"></col>
                <col width="60px"></col>
                <col width="170px"></col>
                <col width="120px"></col>
                <col width="50px"></col>
                <col></col>
                <tbody>
                    <tr>
                    	<th>选择</th>
                        <th>课程编号</th>
                        <th>课程名称</th>
                        <th>次数</th>
                        <th>有效期</th>
                        <th>数量</th>
                        <th>单价</th>
                        <th>小计</th>
                    </tr>
                </tbody>
            </table>
            <div style="height:245px !important">
            <table class="table">
            	<col width="50px"></col>
				<col width="120px"></col>
                <col width="160px"></col>
                <col width="60px"></col>
                <col width="170px"></col>
                <col width="120px"></col>
                <col width="50px"></col>
                <col></col>
                <tbody id="listTbodyLessons">
                    
                </tbody>
            </table>
            </div>
	</div>
    <table class="table">
    	<tr>
            <td colspan="7">
                <ul class="goods_ul fr p10">                            
                    <li>总价：<span class="color_lv mlr5 f18">￥<span id="totalAmount">0.00</span></span></li>
                    <li>应付金额<span class="fb mlr5 color_org f18">￥<span id="infactAmount">0.00</span></span></li>
                </ul>
            </td>
        </tr>
    </table>
    <!-- 记录表格行数 -->
    <input type="hidden" name="tableCount" id="tableCount" value="0" />
    <input type="hidden" name="buyCourseMemberId" id="buyCourseMemberId" />
    <input type="hidden" name="infactAmountInput" id="infactAmountInput" />
    <input type="hidden" name="totalPrdCount" id="totalPrdCount" value="0" />
</form>    
    
    </div>
    <div class="clear"></div>
    <dl class="payment_r_dl f16 mt20 ml200">
        <dd><input type="button" class="btn" value="下单结算" onclick="buyCourse();" id="buyCourse"></dd>
        <dd><input type="button" class="btn w150" value="刷新付款结果" onclick="refreshPayResult('3');"><input id="payId3" type="text" class="iput_t w200 ml10"></dd>
	</dl>
	
    <div class="btm_btn btm_bg">
    	<dl>
    		<dd><input type="button" class="btn" onClick="$('#ex').window('close');getAjaxcourseHis();" value="完成"></dd>
        	<dd><input type="button" class="btn" onClick="$('#ex').window('close');" value="关闭"></dd>
        </dl>
    </div>
</div>
<!---弹出层--->


<!---弹出层--->
<div id="e" class="easyui-window" title="退款" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:600px; height:250px; position:relative;">

	<div class="w360_c details_ul f16" >
    	<ul class="mt30">
        	<li><label>余额：</label>￥<span id="balanceDrawback"></span></li>
            <li><label>退款：</label>￥<span id="moneyDrawback"></span><!-- <input type="text" class="iput_t" id="moneyDrawback" onkeyup="rechargeOrReback('2',this);" readonly="readonly"> --></li>
            <li><label>订单总额：</label>￥<span id="amountDrawback">0</span></li>
            <li class=" w540"><input type="button" value="退款结算" class="btn_no w100 ml10" id="toReback" disabled="disabled" onclick="recharge('2');"><input type="button" value="刷新付款结果" class="btn w100 ml10" onclick="refreshPayResult('2');"><input type="text" id="payId2" class="iput_t w200 ml10"></li>
        </ul>
    </div>
    <div class="btm_btn btm_bg">
    	<dl>
        	<dd><input type="button" class="btn" onClick="$('#e').window('close');getMemerInfo2('2');" value="完成"></dd>
        	<dd><input type="button" class="btn" onClick="$('#e').window('close');" value="关闭"></dd>
        </dl>
    </div>
</div>
<!---弹出层--->

<!---弹出层--->
<div id="t" class="easyui-window" title="合同附件" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:600px; height:200px; position:relative;">
	<div class="shangchuan">
        <ul class="details_ul">
            <li class="lv" id="scAccount"><label>已上传合同：</label><a href="#" onclick="downloadFilFun1();"><span id="contractName">${contractName}</span></a></li>
            <li><label class="fl">选择扫描文件：</label>
			<div class="upload_box fl">
				<input type="text" id="fkContract" name="fkContract" class="iput_t w200">
				<span id="ui-upload-holder fr">
					<input type="file" class="ui-upload-input"	id="f_file" name="file" onchange="setvalue('f_file','fkContract')">
				</span>
				<input type="button" class="btn_l ml10" value="浏览">
			</div>
			</li>
        </ul>
    </div>
		<div class="btm_btn btm_bg">
			<dl>
				<dd>
					<input type="button" class="btn" onclick="uploadSignFile('f_file','1')" value="上传">
				</dd>
				<dd>
					<input type="button" class="btn" onClick="$('#t').window('close')" value="关闭">
				</dd>
			</dl>
	</div>
<!---弹出层--->

	<form action="${basePath}common/downloadAttFile.shtml" id="accountForm" method="post">
       		<input type="hidden" name="attFile" id="attFile1" value="${fkSignFile}">
       		<input type="hidden" name="key" value="${keySignFile}">
       </form>
       <form action="${basePath}common/downloadAttFile.shtml" id="disclaForm" method="post">
       		<input type="hidden" name="attFile" id="attFile2" value="${fkSignFile}">
       		<input type="hidden" name="key" value="${keySignFile}">
       </form>
       <form action="${basePath}common/downloadAttFile.shtml" id="stopcardForm" method="post">
       		<input type="hidden" name="attFile" id="attFile3" value="${fkSignFile}">
       		<input type="hidden" name="key" value="${keySignFile}">
       </form>
</div>

<!---弹出层--->
<div id="g" class="easyui-window" title="独玩免责声明" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:600px; height:200px; position:relative;">
    <div class="shangchuan">
        <ul class="details_ul">
            <li class="lv" id="scSelf"><label>已上传独玩免责声明：</label><a href="#" onclick="downloadFilFun2();"><span id="disclaName">${disclaName}</span></a></li>
            <li><label class="fl">选择扫描文件：</label>
			<div class="upload_box fl">
				<input type="text" id="fkPlayDiscla" name="fkPlayDiscla" class="iput_t w200">
				<span id="ui-upload-holder fr">
					<input type="file" class="ui-upload-input"	id="f_file2" name="file" onchange="setvalue('f_file2','fkPlayDiscla')">
				</span>
				<input type="button" class="btn_l ml10" value="浏览">
			</div>
			</li>
        </ul>
    </div>
    <div class="btm_btn btm_bg">
			<dl>
				<dd>
					<input type="button" class="btn" onclick="uploadSignFile('f_file2','2')" value="上传">
				</dd>
				<dd>
					<input type="button" class="btn" onClick="$('#g').window('close')" value="关闭">
				</dd>
			</dl>
	</div>
</div>
<!---弹出层--->

<!---弹出层--->
<div id="j" class="easyui-window" title="停卡" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:600px; height:260px; position:relative;">
	<div class="shangchuan">
    	<ul class="details_ul">
        	<li><label>停卡时间：</label><input title="" type="text" name="suspendStart" id="suspendStart"
					onClick="WdatePicker({dateFmt:'yyyy.MM.dd',isShowWeek:true,isShowClear:true,readOnly:true,minDate:'${nowDate}' ,maxDate:'#F{$dp.$DV(\'${memberInfo.endDatePage}\')}'})"
					class="Wdate iput_t w82" readonly  style="width:100px" value="" />
                    <span>至</span>
                	<input title="" type="text" name="suspendEnd" id="suspendEnd"
					onClick="WdatePicker({dateFmt:'yyyy.MM.dd',isShowWeek:true,isShowClear:true,readOnly:true,minDate:'#F{$dp.$D(\'suspendStart\')}',maxDate:'#F{$dp.$D(\'suspendStart\',{d:+${dayCount}})}'})"
					class="Wdate iput_t w82" readonly  style="width:100px" value="" /></li>
            <li><label class="vt">停卡原因：</label><textarea class="textare" style="width:235px;" id="suspendReason"></textarea></li>
            
            
            <li class="lv" id="stopCard"><label>已上传经理确认件：</label><a href="#" onclick="downloadFilFun3();"><span id="stopcardName">${stopcardName}</span></a></li>
            <li><label class="fl">选择扫描文件：</label>
			<div class="upload_box fl">
				<input type="text" id="mngFile" name="mngFile" class="iput_t w200">
				<span id="ui-upload-holder fr">
					<input type="file" class="ui-upload-input"	id="f_file3" name="file" onchange="setvalue('f_file3','mngFile')">
				</span>
				<input type="button" class="btn_l ml10" value="浏览">
				<input type="button" class="btn_l ml10" value="上传" onclick="uploadSignFile('f_file3','3')">
			</div>
			</li>
        </ul>
    </div>
    <div class="btm_btn btm_bg">
    	<dl>
        	<dd><input type="button" class="btn" onClick="updateMember('4','4','${type }')" value="确定"></dd>
            <dd><input type="button" class="btn" onClick="$('#j').window('close')" value="取消"></dd>
        </dl>
    </div>
</div>
<!---弹出层--->

<!---弹出层--->
<div id="f" class="easyui-window" title="设为黑名单" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:450px; height:250px; position:relative;">
	<div class="w360_c" style="margin-top:30px !important">
    	<ul class="details_ul">
            <li><label class="vt">设为黑名单原因：</label><textarea class="textare" style="width:235px;" id="blackReason"></textarea></li>
        </ul>
    </div>
    <div class="btm_btn btm_bg">
    	<dl>
        	<dd><input type="button" class="btn" onclick="updateMember('0','0','${type }');" value="确定"></dd>
            <dd><input type="button" class="btn" onClick="$('#f').window('close')" value="取消"></dd>
        </dl>
    </div>
</div>
<!---弹出层--->

<script>
function rechargeOrReback(type,t){
	//var reg=/^\d+[.]?\d{1,2}$/;//小数点后最多两位
	var reg=/\D/g;//支持除数字以外的任何
	var money=t.value;
	if(type=="1"){
		if(reg.test(t.value)==false){
			$('#totalMoney').text('');
			$('#totalMoney').text(money);
		}
		if(money!=""){
			if(!isNaN(money) && parseFloat(money)>0 && money.indexOf(".")==-1){
				$("#toRecharge").removeAttr("disabled");
				$("#toRecharge").removeClass().addClass("btn");
			}else{
				$("#toRecharge").attr("disabled","disabled");
				$("#toRecharge").removeClass().addClass("btn_no");
			}
		}else{
			//为空是页不给充值
			$("#toRecharge").attr("disabled","disabled");
			$("#toRecharge").removeClass().addClass("btn_no");
		}
	}else if(type=="2"){
		var balanceDrawback = $('#balanceDrawback').text();
		if(reg.test(t.value)==false){
			$('#amountDrawback').text('');
			$('#amountDrawback').text(money);
		}
		if(money!=""){
			if(!isNaN(money)){
				if(parseFloat(money)<=parseFloat(balanceDrawback) && parseFloat(money)>0 && money.indexOf(".")==-1){
					$("#toReback").removeAttr("disabled");
					$("#toReback").removeClass().addClass("btn");
				}else{
					$("#toReback").attr("disabled","disabled");
					$("#toReback").removeClass().addClass("btn_no");
				}
			}else{
				$("#toReback").attr("disabled","disabled");
				$("#toReback").removeClass().addClass("btn_no");
			}
		}else{
			//为空是页不给退款
			$("#toReback").attr("disabled","disabled");
			$("#toReback").removeClass().addClass("btn_no");
		}
	}else if(type=="3"){
		var moneyTicketBak = $('#moneyTicketBak').val();
		if(reg.test(t.value)==false){
			$('#amountTicket').text('');
			$('#amountTicket').text(money);
		}
		if(money!=""){
			if(!isNaN(money)){
				if(parseFloat(money)<=parseFloat(moneyTicketBak) && parseFloat(money)>0 && money.indexOf(".")==-1){
					$("#toReTicket").removeAttr("disabled");
					$("#toReTicket").removeClass().addClass("btn");
				}else{
					$("#toReTicket").attr("disabled","disabled");
					$("#toReTicket").removeClass().addClass("btn_no");
				}
			}else{
				$("#toReTicket").attr("disabled","disabled");
				$("#toReTicket").removeClass().addClass("btn_no");
			}
		}else{
			//为空是页不给退票
			$("#toReTicket").attr("disabled","disabled");
			$("#toReTicket").removeClass().addClass("btn_no");
		}
	}
}

function jian(count,id,price) {
	//减商品总数
	var totalPrdCount = $("#totalPrdCount").val();
	$("#totalPrdCount").val(parseInt(totalPrdCount) - 1);
	
	//减数量
	var num = $("#prdCount" + count).val();
	if (parseInt(num) <= 0) {
		$.messager.alert('Warning', "数量已经为0了!", 'warning');
		return;
	}
	$("#prdCount" + count).val(parseInt(num) - 1);
	
	//减小计
	var totalCosts = $("#totalCost" + count).text();
	$("#totalCost" + count).text((parseFloat(totalCosts) - parseFloat(price)).toFixed(2));
	
	//减总价
	var totalAmounts = $("#totalAmount").text();
	$("#totalAmount").text((parseFloat(totalAmounts) - parseFloat(price)).toFixed(2));
	
	//减应付金额
	var infactAmounts = $("#infactAmount").text();
	$("#infactAmount").text((parseFloat(infactAmounts) - parseFloat(price)).toFixed(2));
	
	//判断下单按钮是否可用
	if(parseFloat($("#infactAmount").text())>0){
		$("#buyCourse").removeAttr("disabled").removeClass().addClass("btn");
	}else{
		$("#buyCourse").attr("disabled","disabled").removeClass().addClass("btn_no");
	}
}

function jia(count,id,price) {
	//加商品总数
	var totalPrdCount = $("#totalPrdCount").val();
	$("#totalPrdCount").val(parseInt(totalPrdCount) + 1);
	
	var num = $("#prdCount" + count).val();
	var isOk = true;//false;//虚拟商品不需要库存判断
	/* $.ajax({
		url : "${basePath}order/getProductCount.shtml",
		type : "post",
		dataType : "json",
		async : false,
		data : {
			productId : id
		},
		success : function(data) {
			if (parseInt(num) + 1 > data) {
				$.messager.alert('Warning', "库存已不足!", 'warning');
			} else {
				//modifyGoodsStgCnt(count, -1, null);
				isOk = true;
			}
		},
		error : function(XMLHttpRequest) {
			ajaxError(XMLHttpRequest);
		}
	}); */

	if (isOk){
		//加数量
		$("#prdCount" + count).val(parseInt(num) + 1);
		
		//加小计
		var totalCosts = $("#totalCost" + count).text();
		$("#totalCost" + count).text((parseFloat(totalCosts) + parseFloat(price)).toFixed(2));
		
		//加总价
		var totalAmounts = $("#totalAmount").text();
		$("#totalAmount").text((parseFloat(totalAmounts) + parseFloat(price)).toFixed(2));
		
		//加应付金额
		var infactAmounts = $("#infactAmount").text();
		$("#infactAmount").text((parseFloat(infactAmounts) + parseFloat(price)).toFixed(2));
		
		//判断下单按钮是否可用
		if(parseFloat($("#infactAmount").text())>0){
			$("#buyCourse").removeAttr("disabled").removeClass().addClass("btn");
		}else{
			$("#buyCourse").attr("disabled","disabled").removeClass().addClass("btn_no");
		}
	}
}
</script>

<input type="hidden" id="orderId" name="orderId">
<input type="hidden" id="orderId2" name="orderId2">
<input type="hidden" id="orderId3" name="orderId3">
<input type="hidden" id="orderId4" name="orderId4">

<!-- 全局会员Id -->
<input type="hidden" id="memberId">
<!---弹出层--->
<div id="r" class="easyui-window" title="充值" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:650px; height:250px; position:relative;">
	<div class="w360_c details_ul f16" >
    	<ul class="mt30">
        	<li><label>余额：</label>￥<span id="balance"></span></li>
            <li><label>充值：</label><input type="text" class="iput_t" id="money" onkeyup="rechargeOrReback('1',this);"></li>
            <li><label>订单总额：</label>￥<span id="totalMoney">0</span></li>
            <li class=" w540"><input type="button" value="下单结算" class="btn_no w100 ml10" onclick="recharge('1');" id="toRecharge" disabled="disabled"><input type="button" value="刷新付款结果" class="btn w100 ml10" onclick="refreshPayResult('1');"><input type="text" id="payId" class="iput_t w200 ml10"></li>
        </ul>
    </div>
    <div class="btm_btn btm_bg">
    	<dl>
        	<dd><input type="button" class="btn" onClick="$('#r').window('close');getMemerInfo2('1');" value="完成"></dd>
        	<dd><input type="button" class="btn" onClick="$('#r').window('close');" value="关闭"></dd>
        </dl>
    </div>
</div>


<!--  小朋友会员弹出层   -->
<div id="memberPop" class="easyui-window" title="编辑" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:800px; height:500px;position:relative;">
        <form id="memberForm" method="post">
        <input type="hidden" id="pkMemId_member" name="pkMemId">
        <input type="hidden" name="memType" value="${type }">
        <input type="hidden" name="familyId" value="${memberInfo.familyId }">
	<input type="hidden" name="fing1" id="fing1_member" >
	<input type="hidden" name="fing2" id="fing2_member">
	<input type="hidden" name="ftype1" id="ftype1_member">
	<input type="hidden" name="ftype2" id="ftype2_member">
        <div class="collection_l fixed" style="width:100%">
        	<div class="collection_t ml10 fixed">
            	<div class="collection_contet mt20">
                	<div class="collection_img fl">
                    	<span class="collection_span">
                        	<input type="hidden" id="imagePath_member" name="imagePath"/>
				<img class="colle_img" style="width:150px;height:200px;" onclick="openCameraPage(1);" title="点击拍摄图片"  id="memberImage" src="${basePath }commonCss/images/zp.jpg">
                        </span>
                      <div class="collection_img_p" id="memberCardName">
                      </div>
                    </div>
                    <div class="collection_text fl">
                    	<div class="fl">
                            <ul class="f14 details_ull w250 fl">
                            	<li>
                                    <label><span class=" color_red mr5">*</span>姓名：</label>
                                    <input type="text" class="iput_t w150" id="memName_member" name="memName" maxlength="25">
                                </li>
                                <li>
                                	<label><span class=" color_red mr5">*</span>性别：</label>
					<ul class="ul_radio fl" id="ul_member">
                                        <li><input type="radio" id="girlRadioButton_member" name="sex" value="女" class="mr5">女</li>
                                        <li><input type="radio" id="boyRadioButton_member" name="sex" value="男" class="mr5">男</li>
                                        <li><input type="checkbox" id="isVip_member" name="isVip" class="mr5 vt"><i class="vip_icon"></i></li>
                                    </ul>
                                </li>
                                <li>
                                	<label><span class=" color_red mr5">*</span>生日：</label>
					<a class="customer_calendar_icon" href="#" onClick="WdatePicker({el:'birthday',maxDate:'%y-%M-%d'})"></a>
	            	 		<input type="text"   id="birthday_member" name="birthdayPage" class="iput_t w150" onClick="WdatePicker({maxDate:'%y-%M-%d'})" >
	            	 	</li>
                                <li><label><span class=" color_red mr5">*</span>国籍：</label>
                                	<div class=" uboxstyle_small">
	                                        <select name="country" id="country_member">
							<c:forEach items="${countryList}" var="country" >
		                                        <option value="${country.pkCountryId }">${country.countryDesc }</option>
		                                        </c:forEach>
	                                        </select>
                                    </div>
                                </li>
                                
                                <li style="display: none;"><label><span class=" color_red mr5"></span>编号：</label><span id="spanMemberId_member"></span></li>
                                <li><label>接领密码：</label><input type="password" id="pwd1_member" name="receivePwd" class="iput_t w150" ></li>
                                <li><label>重复密码：</label><input type="password" id="pwd2_member" class="iput_t w150" ></li>
                                <li><label></label><input type="checkbox" id="canConsume_member" name="canConsume" > 可消费余额</li>
                                <li><label></label><input type="checkbox" id="signDisclaimer_member" name="signDisclaimer" class="mr5">单独游玩免责声明已签署</li>
                            </ul>
                        </div>
                        <ul class="f14 fl">
                             <li>注意事项</li>
                             <li><textarea id="note" name="note" class="textare w200"></textarea></li>
                             <li class="mt10">员工备注</li>
                             <li><textarea id="memo" name="memo" class="textare w200"></textarea></li>
                            <li class="mt10"><span class=" color_red mr5">*</span>销售：
                            	<div class=" uboxstyle_small">
                                    <select name="fkSales" id="fkSales_member">
                                        <option value=""></option>
										<c:forEach items="${salesList}" var="sales" >
                                        	<option value="${sales.pkUsrId }">${sales.usrName }</option>
                                        </c:forEach>
                                    </select>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
                <a href="#" class="collection_add fr" onclick="fingerType='member';openFingerPrint();"><img id="fingerImg_member" src="${basePath }commonCss/images/zhiwen_c.png"></a>
            </div>
           
        </div>
         <div class="btm_btn btm_bg">
    	<dl>
        	<dd><input type="button" class="btn" id="memberOK" value="确定"></dd>
		<dd><input type="button" class="btn" onclick="$('#memberPop').window('close');" value="取消"></dd>
        </dl>
    </div>
    </form>
</div>
<!--  小朋友会员弹出层   -->

<!--  小朋友非会员弹出层   -->
<div id="notMemberPop" class="easyui-window" title="新增" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:580px; height:460px;position:relative;">
        <form id="notMemberForm" method="post">
        <input type="hidden" id="pkMemId" name="pkMemId">
        <input type="hidden" name="memType" id="memType" value="${type }">
        <input type="hidden" name="familyId" value="${memberInfo.familyId }">
	<input type="hidden" name="fing1" id="fing1_notMember">
	<input type="hidden" name="fing2" id="fing2_notMember">
	<input type="hidden" name="ftype1" id="ftype1_notMember">
	<input type="hidden" name="ftype2" id="ftype2_notMember">
        <div class="collection_l fixed" style="width:100%">
        	<div class="collection_t ml10 fixed">
            	<div class="collection_contet mt20">
                	<div class="collection_img fl">
                    	<span class="collection_span">
                        	<input type="hidden" id="imagePath_notMember" name="imagePath"/>
                            	<img id="notMemberImage" class="p10"  style="width:150px;height:190px;"  onclick="openCameraPage(2);" title="点击拍摄图片" src="../../commonCss/images/index_02.gif">
                        </span>
                    </div>
                    <div class="collection_text fl">
                    	<div class="fl">
                            <ul class="f14 details_ull w250 fl">
                            	<li>
                                    <label><span class=" color_red mr5">*</span>姓名：</label>
                                    <input type="text" class="iput_t w150" id="memName" name="memName" maxlength="25">
                                <li>
                                	<label><span class=" color_red mr5">*</span>性别：</label>
                                    <ul class="ul_radio fl">
                                        <li><input type="radio" id="girlRadioButton" name="sex" value="女" class="mr5">女</li>
                                        <li><input type="radio" id="boyRadioButton" name="sex" value="男" class="mr5">男</li>
                                        <li><input type="checkbox" id="isVip" name="isVip" class="mr5 vt"><i class="vip_icon"></i></li>
                                    </ul>
                                </li>
                                <li><label><span class=" color_red mr5">*</span>生日：</label>
<a class="customer_calendar_icon" href="#" onClick="WdatePicker({el:'birthday'})"></a>
	            	 <input type="text"   id="birthday" name="birthdayPage" class="iput_t w150" onClick="WdatePicker({maxDate:'%y-%M-%d'})" ></li>
                                <li><label><span class=" color_red mr5">*</span>国籍：</label>
                                	<div class=" uboxstyle_small">
                                        <select name="country" id="country">
						<c:forEach items="${countryList}" var="country" >
	                                        <option value="${country.pkCountryId }">${country.countryDesc }</option>
	                                        </c:forEach>
                                        </select>
                                    </div>
                                </li>
                                
                                <li id="pk" style="display: none;"><label><span class=" color_red mr5"></span>编号：</label><span id="spanMemberId"></span></li>
                                <li><label>接领密码：</label><input type="password" id="pwd1" name="receivePwd" class="iput_t w150"  maxlength="25"></li>
                                <li><label>重复密码：</label><input type="password" id="pwd2" class="iput_t w150" maxlength="25" ></li>
                                <c:if test="${type==3 }">
	                            <li class="mt10"><label>销售：</label>
	                            	<div class=" uboxstyle_small">
                                    	<select name="fkSales" id="fkSales">
                                    		<option value=""></option>
											<c:forEach items="${salesList}" var="sales" >
	                                        	<option value="${sales.pkUsrId }">${sales.usrName }</option>
	                                        </c:forEach>
	                                    </select>
	                                </div>
	                            </li>
	                            </c:if>
                                <li><label></label><input type="checkbox" id="canConsume" name="canConsume" > 可消费余额 </li>
                                <li><label></label><input type="checkbox" id="signDisclaimer" name="signDisclaimer" class="mr5">单独游玩免责声明已签署</li>
                            </ul>
                        </div>
                    </div>
                </div>
                <a href="#" class="collection_add fr" onclick="fingerType='notMember';openFingerPrint();"><img id="fingerImg_notMember" src="${basePath }commonCss/images/zhiwen_c.png"></a>
            </div>
           
        </div>
         <div class="btm_btn btm_bg">
    	<dl>
        	<dd><input type="button" class="btn" id="notMemberOK" value="确定"></dd>
            <dd><input type="button" class="btn" onclick="$('#notMemberPop').window('close')" value="取消"></dd>
        </dl>
    </div>
    </form>
</div>
<!--  小朋友弹出层   -->

<!---大人 弹出层--->
<div id="guaPop" class="easyui-window" title="编辑信息" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:640px; height:350px;position:relative;">
	 <form id="guaForm" name="guaForm" method="post">
        <input type="hidden" id="pkGuaId" name="pkGuaId">
        <input type="hidden" id="fkMemId_gua" name="memberId" value="${memberInfo.pkMemId}">
	<input type="hidden" name="fing1" id="fing1_gua">
	<input type="hidden" name="fing2" id="fing2_gua">
	<input type="hidden" name="ftype1" id="ftype1_gua">
	<input type="hidden" name="ftype2" id="ftype2_gua">
	 <div class="collection_l fixed">
        	<div class="collection_t ml10 fixed">
            	<div class="collection_contet mt20">
                	<div class="collection_img fl" style="width:146px !important;">
                    	<span class="collection_span">
                        	<input type="hidden" id="imagePath_gua" name="imagePath"/>
                       		<img id="guaImage" onclick="openCameraPage(3);" title="点击拍摄图片" class="p10" src="${basePath }commonCss/images/15-1.png" style="width:130px;height:160px;">
                        </span>
                    </div>
                    <div class="collection_text fl">
                    	<div class="fl">
                            <ul class="f14 details_ull">
                                <li><label><span class=" f16 color_red mr5">*</span>关系：</label>
                                	<div class=" uboxstyle">
                                    <select id="fkReltypeId" name="fkReltypeId">
					<c:forEach items="${reltypeList}" var="reltype" >
                                        <option value="${reltype.pkReltypeId }">${reltype.relDesc }</option>
                                        </c:forEach>
                                    </select>
                                </div>
                                </li>
                                <li><label><span class=" f16 color_red mr5">*</span>姓名：</label><input type="text" id="name" name="name" class="iput_t w200" maxlength="25" ></li>
                                <li><label><span class="color_red mr5">*</span>电话：</label>
                               		<div class="formx">
			                        <span id="num_info" for="telNum"></span>
	                               		<input type="text" id="telNum" name="telNum"  class="iput_t w200" maxlength="15">
                               		</div>
                                </li>
                               <li><label>Email：</label><input type="text" id="email" name="email"  class="iput_t w200" placeholder="邮箱地址"></li>
                                <li><label></label><input type="checkbox" id="canConsume_gua" name="canConsume" class="mr5">可消费余额</li>
                                <li><label></label><input type="checkbox" id="canReceive" name="canReceive" class="mr5">可接领</li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="collection_text fl">
                	<a href="#" class="collection_add fr" onclick="fingerType='gua';openFingerPrint();"><img id="fingerImg_gua" src="${basePath }commonCss/images/zhiwen_c.png"></a>
                </div>
            </div>
     </div>
     <div class="btm_btn btm_bg">
    	<dl>
		<dd><input type="button" class="btn" id="guaOK" value="确定"></dd>
		<dd><input type="button" class="btn" onclick="$('#guaPop').window('close');" value="取消"></dd>
        </dl>
    </div>
    </form>
</div>
<!---大人 弹出层--->


<!--  指纹扫描   -->
<div id="fingerprintPop" class="easyui-window" title="指纹扫描" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:260px; height:260px;position:relative;">
	<div style="display:none;">
		<object classid="clsid:82C2415C-1EC7-41ED-A6F0-2BCA3B4216E2" id="finger" codebase="${basePath }plugin/Ferly727.ocx">
		  <param name="_ExtentX" value="635">
		  <param name="_ExtentY" value="582">
		  <param name="_StockProps" value="64">
		  <param name="Enabled" value="1">
		</object>
	</div>
	<table class="table_x">
    	<tr>
		<td onclick="collectFingerFea(1);">
			<img id ="imgFing1" src="${basePath }commonCss/images/zhiwen_w.png" title="单击开始扫描指纹">
			<input type="hidden" name="fing1" id="fing1">
			<input type="hidden" name="ftype1" id="ftype1">
		</td>
		<td onclick="collectFingerFea(2);">
			<img id ="imgFing2" src="${basePath }commonCss/images/zhiwen_j.gif" title="单击开始扫描指纹">
			<input type="hidden" name="fing2" id="fing2">
			<input type="hidden" name="ftype2" id="ftype2">
		</td>
        </tr>
    </table>
    <div class="btm_btn btm_bg">
      <dl>
          <dd><input type="button" class="btn" onclick="fingerprintOK();" value="确定"></dd>
          <dd><input type="button" class="btn" onclick="$('#fing1').val('');$('#fing2').val('');$('#fingerprintPop').window('close');" value="取消"></dd>
      </dl>
    </div>
</div>
<!--  指纹扫描   -->


<!--  手指选择   -->
<div id="fingerPop" class="easyui-window" title="选择" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:550px; height:300px;position:relative;">
	
    <!----select--->
    <div class="">
        <table class="table">
    	<tr><th>左手</th><th>右手</th></tr>
    	<tr>
		<td><label for="f1"><input type="radio" id="f1" name="fingerIndex" value="1">大拇指</label></td>
		<td><label for="f6"><input type="radio" id="f6" name="fingerIndex" value="6">大拇指</label></td>
	</tr>
    	<tr>
		<td><label for="f2"><input type="radio" id="f2" name="fingerIndex" value="2">食&nbsp;　指</label></td>
		<td><label for="f7"><input type="radio" id="f7" name="fingerIndex" value="7">食&nbsp;　指</label></td>
	</tr>
    	<tr>
		<td><label for="f3"><input type="radio" id="f3" name="fingerIndex" value="3">中&nbsp;　指</label></td>
		<td><label for="f8"><input type="radio" id="f8" name="fingerIndex" value="8">中&nbsp;　指</label></td>
	</tr>
    	<tr>
		<td><label for="f4"><input type="radio" id="f4" name="fingerIndex" value="4">无名指</label></td>
		<td><label for="f9"><input type="radio" id="f9" name="fingerIndex" value="9">无名指</label></td>
	</tr>
    	<tr>
		<td><label for="f5"><input type="radio" id="f5" name="fingerIndex" value="5">小拇指</label></td>
		<td><label for="f10"><input type="radio" id="f10" name="fingerIndex" value="10">小拇指</label></td>
	</tr>
    </table>
    </div>
    <!----select--->
    
    <div class="btm_btn btm_bg">
      <dl>
          <dd><input type="button" class="btn" onclick="fingerSelectOK();" value="确定"></dd>
          <dd><input type="button" class="btn" onclick="fingerSelectCancel();" value="取消"></dd>
      </dl>
    </div>
</div>
<!--  手指选择 -->


</body>
</html>